pub mod account_info_request;
use crate::config::CONFIG;

pub enum API{
    SynCfg,//同步配置
    HidList,//货架列表
}

impl API{
    pub fn url(&self)->String{
        match self{
            API::SynCfg=>join_url("/bhapi/config"),
            API::HidList=>join_url("/bhapi/list"),
        }
    }
}
pub fn join_url(url: &str)->String{
    let full_url=CONFIG.api_url.clone()+url;
    full_url
}

